package design_1_factory.demo3.factory;

/**
 * 工厂生成器
 *
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2022/4/11 16:24
 */
public class QQFactoryProducer {

	public static QQAbstractFactory getFactory(String factory) {
		if (factory.equalsIgnoreCase("A")) {
			return new AFactory();
		} else if (factory.equalsIgnoreCase("B")) {
			return new BFactory();
		} else if (factory.equalsIgnoreCase("C")) {
			return new CFactory();
		}
		return null;
	}
}
